<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="description" content="Dashboard"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <title>钉钉登陆中....</title>
    <script type="text/javascript" src="/gobal/js/jquery/jquery-2.0.3.min.js"></script>
    <script src="/module/dingdingapi/dingtalk.open.js"></script>
    <script>
        var corpId = "${ddConfig.dingdingCorpId}";
        var orgId = "${ddConfig.orgId}";
        var url = "${parameter.url}";
        $(function () {
            dd.ready(function () {
                dd.runtime.permission.requestAuthCode({
                    corpId: corpId,
                    onSuccess: function (result) {
                        var code = result.code;
                        $.get("/dingding/dingdingget/getUserInfo?code=" + code + "&orgId=" + orgId, function (response) {
                            if (response.status == "200") {
                                window.location.href = url;
                            }
                        });
                    },
                    onFail: function (err) {
                    }
                })
            });
        });
    </script>
</head>
<body>
</body>

</html>
